home *** CD-ROM | disk | FTP | other *** search
/ MacUser ROM 45 / MACUSER-ROM-VOL-45-1997-08.ISO.7z / MACUSER-ROM-VOL-45-1997-08.ISO / オンラインソフト / オンラインソフト⁄毎号掲載 / インターネット関連 / PageSpinner 2.0 / Examples / JavaScript / Remote_Control_Window < prev    next >
Text File  |  1997-05-22  |  3KB  |  73 lines

  1. <HTML><HEAD>
  2. <TITLE>Remote Control Window</TITLE>
  3. </HEAD>
  4.  
  5.  
  6. <BODY BGCOLOR=FFFFFF TEXT=000000>
  7. <H1>Remote Control Window</H1>
  8.  
  9. <B>This page contains a JavaScript that open a new window with a specified size and contents</B>
  10. <P>
  11. Please note that JavaScript is currently only available in Netscape Navigator 2.0 or higher.<BR>
  12. <FONT COLOR="931B15">Do not assume that all in your audience are using a JavaScript enabled browser.</FONT>
  13. <HR>
  14. <P>
  15. This short JavaScript lets  you open a file in a new window - you can also specify the size of the window and if the toolbar and other parts of the windows user interface should be displayed.
  16. <P>
  17. We use it to create a small remote control that will let you choose beetween some of the JavaScript Examples included with PageSpinner. The source of the remote control page is in the <A HREF="remote.html">remote.html</A>.
  18. <P>
  19. Since the window size is specified in pixels, it is recommended to use a table with a preset size in pixels or images as the contents of the page. In our example we can't be sure that the full table will be visible in the window, so we choose to let the scrollbars be visible, but disables most other user-interface parts of the window.
  20. <P>
  21.  
  22. Open  
  23. <A HREF=""
  24.  onClick='msgWindow=window.open
  25.    ("remote.html","displayWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=260,height=220"); return false'>Remote Control</A> page.<BR>
  26.  
  27. <FORM>
  28. <INPUT TYPE=BUTTON VALUE="Remote Control" onClick='msgWindow=window.open
  29.    ("remote.html","displayWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=260,height=220"); return false'>
  30. </FORM> 
  31.  
  32. <P>
  33. <B>How to use:</B><BR>
  34. <BLOCKQUOTE>
  35. <P>
  36. Use code similar to this to let the user display the window by clicking on a link:
  37.  
  38. <XMP><A HREF=""
  39.  onClick='msgWindow=window.open
  40.    ("remote.html","displayWindow","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,width=260,height=220"); return false'>Remote Control</A> page.
  41. </XMP>
  42.  
  43. Use code similar to this to let the user display the window by clicking on a button:
  44.  
  45. <XMP><FORM>
  46. <INPUT TYPE=BUTTON VALUE="Remote Control" onClick='msgWindow=window.open
  47.    ("remote.html","displayWindow","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,width=260,height=220"); return false'>
  48. </FORM></XMP>
  49. <P>
  50. Change the setting of the window options by editing the text, most options accepts the values <I>yes</I> or <I>no</I>.
  51.  
  52. The following options and values can be specified when opening a new window:
  53. <UL>
  54. <LI>toolbar[=yes|no]|[=1|0]
  55. <LI>location[=yes|no]|[=1|0]
  56. <LI>directories[=yes|no]|[=1|0]
  57. <LI>status[=yes|no]|[=1|0]
  58. <LI>menubar[=yes|no]|[=1|0]
  59. <LI>scrollbars[=yes|no]|[=1|0]
  60. <LI>resizable[=yes|no]|[=1|0]
  61. <LI>width=pixels
  62. <LI>height=pixels
  63. </UL>
  64.  
  65. <P>
  66. Replace the filename, <CODE>"remote.html"</CODE>, with the name of the page that contains your remote control. You can of course put other contents in the window that is opened, e.g.,  a guided tour of your site, (see the <A HREF="../Miscellaneous Examples/Autoload.html">autoload</A> example) or you can use it as status window.
  67. <P>
  68. Please note that some browser, like Navigator 3.0, will not use all specified options.
  69. </BLOCKQUOTE>
  70.  
  71. </BODY>
  72. </HTML>
  73.